package io.api.modules.project.service;

import io.admin.common.page.PageData;
import io.admin.common.service.CrudService;
import io.api.modules.login.dto.WorkOrderDTO;
import io.api.modules.login.entity.UserEntity;
import io.api.modules.project.dto.MessageDTO;
import io.api.modules.project.entity.MessageEntity;

import java.util.List;
import java.util.Map;

/**
 * 用户消息表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2024-07-17
 */
public interface MessageService extends CrudService<MessageEntity, MessageDTO> {

    void saveBatch(WorkOrderDTO workOrderDTO, UserEntity user);

    long selectCount(Long userId);

    int countUnRead(Long userId);

    List<MessageEntity> selectUnRead(Long userId);

    int readAll(Long userId, Integer read);

    void read(Long[] msgIds, int i);

    PageData<MessageDTO> page(Map<String, Object> params);
}